/**********************************************************************
 Name:  TestSynCoordinateHCP,测试用例
 Purpose: 测试做科内会拜访把对应的开始时间和坐标同步到callplan                                                         
-------                                                             
======================================================
History                                                            
-------                                                            
VERSION  AUTHOR               DATE                 DETAIL                                
   1.0 -      huang xiaojiang      04/29/2010      Create          : 
***********************************************************************/
@isTest
private class TestSynCoordinateHCP{
   
    static testMethod void test(){
           Profile p=[select  id from profile where  name='Sales Rep - Medical' limit 1];
           User u=new user(alias='hxj',email='xjhuanw3ww7@isoftstone.com',lastName='testing'
               ,languageLocaleKey='zh_CN',localeSidkey='zh_CN' ,TimeZoneSidKey='Asia/Shanghai',EmailEncodingKey='UTF-8',
               profileId=p.id,userName='xjhuang4123@isoftstone.com');
               
               System.runAs(u){
                    
                    //科内会记录类型
                      
                    list<recordtype> lstRT=new list<recordtype>();
                    id IdKNH;
                    lstRT=[select id,DeveloperName from recordtype where sobjecttype=:'HCPEducation__c' and DeveloperName=:'PocketSession'];
                    if(lstRT.size()>0){
                        IdKNH=lstRT[0].id;
                    }
                   //新建一条科内会信息                   
                   HCPEducation__c hcpedu=new HCPEducation__c(name='testsaloon',date__c=date.today()+1 ,recordtypeid=IdKNH,woc__c=null,noc__c=null,
                       eoc__c=null,soc__c=null,place__c='asdf',organizer__c='其他',ifotherorganizer__c='aaa');             //create a saloon type record;
                   insert hcpedu; 
                   //更新这条科内会信息
                   hcpedu.lat__c='111.22222';
                   hcpedu.lon__c='33.999';
                   hcpedu.StartTime__c=dateTime.now();
                   
                   update hcpedu;
                                     
               }        
    }
 }